package com.un.ebs.product.domain;

import com.un.ebs.product.enums.ProductUnitTypeEnum;
import com.un.ebs.product.enums.ProductSaleTypeEnum;
import com.un.ebs.order.enums.PaymentStatusEnum;
import com.un.ebs.product.enums.ProductPurchaseTypeEnum;

import java.util.Date;

import com.un.ebs.product.enums.ProductChargeTypeEnum;
import com.un.ebs.product.enums.ProductSkuResourceStatusEnum;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.stereotype.Component;
import lombok.Data;
import com.un.ebs.core.metadata.DbField;

/**
 * (ProductSkuExt)表实体类
 *
 * @author liubo
 * @since 2020-08-18 09:33:43
 */
@Data
@Component
@TableName("v_product_sku_ext")
@SuppressWarnings("serial")
public class ProductSkuExt extends Model<ProductSkuExt> {


    @DbField(name = "id", length = 40, precision = 0)
    private String id;

    @DbField(name = "sku_code", length = 100, precision = 0)
    private String skuCode;

    @DbField(name = "name_as", length = 2100, precision = 0)
    private String nameAs;

    @DbField(name = "name", length = 100, precision = 0)
    private String name;

    @DbField(name = "sale_attr_desc", length = 2000, precision = 0)
    private String saleAttrDesc;

    @DbField(name = "qty", length = 10, precision = 2)
    private Double qty;

    @DbField(name = "price", length = 10, precision = 2)
    private Double price;

    @DbField(name = "is_price_confer", length = -1, precision = 0)
    private Boolean isPriceConfer;

    @TableLogic
    @DbField(name = "is_delete", length = -1, precision = 0)
    private Boolean isDelete;

    @DbField(name = "product_id", length = 40, precision = 0)
    private String productId;

    @DbField(name = "spu_code", length = 40, precision = 0)
    private String spuCode;

    @DbField(name = "spu_is_delete", length = -1, precision = 0)
    private Boolean spuIsDelete;

    @DbField(name = "class_id", length = 40, precision = 0)
    private String classId;

    @DbField(name = "class_name", length = 2000, precision = 0)
    private String className;

    @DbField(name = "class_root_name", length = 2000, precision = 0)
    private String classRootName;

    @DbField(name = "is_main_sale", length = -1, precision = 0)
    private Boolean isMainSale;

    @DbField(name = "unit_type", length = -1, precision = 0)
    private ProductUnitTypeEnum unitType;

    @DbField(name = "charge_type", length = -1, precision = 0)
    private ProductChargeTypeEnum chargeType;

    @DbField(name = "purchase_type", length = -1, precision = 0)
    private ProductPurchaseTypeEnum purchaseType;

    @DbField(name = "purchase_type_desc", length = 20, precision = 0)
    private String purchaseTypeDesc;

    @DbField(name = "sale_type", length = -1, precision = 0)
    private ProductSaleTypeEnum saleType;

    @DbField(name = "buy_min_qty", length = -1, precision = 0)
    private Integer buyMinQty;

    @DbField(name = "buy_max_qty", length = -1, precision = 0)
    private Integer buyMaxQty;

    @DbField(name = "deliver_ready_time", length = 10, precision = 0)
    private String deliverReadyTime;

    @DbField(name = "charge_min_money", length = 10, precision = 4)
    private Double chargeMinMoney;

    @DbField(name = "tenant_id", length = 40, precision = 0)
    private String tenantId;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time", length = -1, precision = 0)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at", length = 40, precision = 0)
    private String createAt;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_time", length = -1, precision = 0)
    private Date lastModifiedTime;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_at", length = 40, precision = 0)
    private String lastModifiedAt;

    @DbField(name = "is_sku_sale", length = -1, precision = 0)
    private Boolean isSkuSale;

    @DbField(name = "is_spu_sale", length = -1, precision = 0)
    private Boolean isSpuSale;

    @DbField(name = "price_confirm_type", length = -1, precision = 0)
    private Integer priceConfirmType;

    @DbField(name = "sale_start", length = -1, precision = 0)
    private Date saleStart;

    @DbField(name = "sale_end", length = -1, precision = 0)
    private Date saleEnd;

    @DbField(name = "deliver_start", length = -1, precision = 0)
    private Date deliverStart;

    @DbField(name = "deliver_end", length = -1, precision = 0)
    private Date deliverEnd;

    @DbField(name = "remark", length = 2000, precision = 0)
    private String remark;

    @DbField(name = "is_book", length = -1, precision = 0)
    private Boolean isBook;

    @DbField(name = "pre_time_book_qty", length = -1, precision = 0)
    private Integer preTimeBookQty;

    @DbField(name = "resource_status", length = -1, precision = 0)
    private ProductSkuResourceStatusEnum resourceStatus;

    @DbField(name = "resource_status_desc", length = 10, precision = 0)
    private String resourceStatusDesc;

    @DbField(name = "spu_payment_status", length = -1, precision = 0)
    private PaymentStatusEnum spuPaymentStatus;

    @DbField(name = "spu_pre_order_time_out_day", length = -1, precision = 0)
    private Integer spuPreOrderTimeOutDay;

    @DbField(name = "resource_order_item_id", length = 40, precision = 0)
    private String resourceOrderItemId;

    @DbField(name = "item_count", length = -1, precision = 0)
    private Integer itemCount;

    @DbField(name = "item_money", length = 38, precision = 6)
    private Double itemMoney;

    @DbField(name = "is_deliver_flow", length = -1, precision = 0)
    private Boolean isDeliverFlow;

    @DbField(name = "is_deliver_audit_status", length = -1, precision = 0)
    private Boolean isDeliverAuditStatus;

    @DbField(name = "is_must_defunct_by_order", length = -1, precision = 0)
    private Boolean isMustDefunctByOrder;

    @DbField(name = "is_must_defunct_tomb_sku_by_order", length = -1, precision = 0)
    private Boolean isMustDefunctTombSkuByOrder;

    @DbField(name = "logo_image", length = 200, precision = 0)
    private String logoImage;

    @DbField(name = "is_virtual", length = -1, precision = 0)
    private Boolean isVirtual;

    @DbField(name = "qrcode", length = 40, precision = 0)
    private String qrcode;

    @DbField(name = "production_seq_id", length = 40, precision = 0)
    private String productionSeqId;

    @DbField(name = "production_seq_name", length = 100, precision = 0)
    private String productionSeqName;

    @DbField(name = "sku_idx")
    private int skuIdx;

}